package com.jiuzhi.system.service.impl;

import com.jiuzhi.common.core.text.Convert;
import com.jiuzhi.system.domain.YxCommunity;
import com.jiuzhi.system.mapper.YxCommunityMapper;
import com.jiuzhi.system.service.IYxCommunityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 项目明细Service业务层处理
 *
 * @author jiuzhi
 * @date 2020-02-15
 */
@Service
public class YxCommunityServiceImpl implements IYxCommunityService
{
    @Autowired
    private YxCommunityMapper yxCommunityMapper;

    /**
     * 查询项目明细
     *
     * @param comId 项目明细ID
     * @return 项目明细
     */
    @Override
    public YxCommunity selectYxCommunityById(Long comId)
    {
        return yxCommunityMapper.selectYxCommunityById(comId);
    }

    /**
     * 查询项目明细列表
     *
     * @param yxCommunity 项目明细
     * @return 项目明细
     */
    @Override
    public List<YxCommunity> selectYxCommunityList(YxCommunity yxCommunity)
    {
        return yxCommunityMapper.selectYxCommunityList(yxCommunity);
    }

    /**
     * 新增项目明细
     *
     * @param yxCommunity 项目明细
     * @return 结果
     */
    @Override
    public int insertYxCommunity(YxCommunity yxCommunity)
    {

        return yxCommunityMapper.insertYxCommunity(yxCommunity);
    }

    /**
     * 修改项目明细
     *
     * @param yxCommunity 项目明细
     * @return 结果
     */
    @Override
    public int updateYxCommunity(YxCommunity yxCommunity)
    {
        return yxCommunityMapper.updateYxCommunity(yxCommunity);
    }

    /**
     * 删除项目明细对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteYxCommunityByIds(String ids)
    {
        return yxCommunityMapper.deleteYxCommunityByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除项目明细信息
     *
     * @param comId 项目明细ID
     * @return 结果
     */
    @Override
    public int deleteYxCommunityById(Long comId)
    {
        return yxCommunityMapper.deleteYxCommunityById(comId);
    }
}
